﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConstructorAndModExample
{
    class Student
    {
        private int id;
        private string name;

        public void SetId(int id)
        {
            if (id < 0)
            {
                this.id = 0;
            }
            else
            {
                this.id = id;
            }
        }


        public int GetId()
        {
            return this.id;
        }

        public Student()
        {
        }

        public Student(int id)
        {
            SetId(id);
        }

        public Student(string name)
        {
            this.name = name;
        }

        public Student(int id, string name):this(id)
        {
            this.name = name;
        }
    }
}
